<!-- 游戏配置 -->
<template>
  <SearchTable :query="data.query" :list="data.list" :total="data.total" @changeSize="changeSize"
    @changePage="changePage" @search="getSearchList" @reset="resetDetails(true)" @changeTh="data.dialogVisible = true">
    <template #other>
      <el-tabs v-model="data.gameType" type="card" class="demo-tabs" @tab-change="handleClick"
        style="user-select: none;">
        <el-tab-pane v-for="item in GAMETYPE" :label="item.label + '配置'" :name="item.value" />
      </el-tabs>
    </template>
    <template #form>
      <Operator ref="OperatorRef" @query="queryItem" />
      <GameItem ref="GameItemRef" @query="queryGame" />
    </template>
    <template #button>
      <el-button type="danger" @click="getCommercialList(-1), data.isShowMaintain = true">维护{{ selectToLabel(GAMETYPE,data.gameType) }}游戏</el-button>
      <el-button type="warning"  v-show="data.gameType == 1 ? true : false" 
      @click="getCommercialList(-1), data.isShowMaintain = true, data.queryDetails.isRtpShow = true">RTP批量设置</el-button>
    </template>
    <template #table>
      <template v-for="(item, index) in data.fields" :key="index">
        <el-table-column v-if="item.visible" :prop="item.prop" :label="item.label" :width="item.width"
          show-overflow-tooltip>
          <template #header>
            <el-tooltip v-if="item.tips" effect="dark" placement="top">
              <template #content> {{ item.tips }} </template>
              <el-icon class="ques-tips">
                <QuestionFilled />
              </el-icon>
            </el-tooltip>
            {{ item.label }}
          </template>
          <template v-if="item.prop == 'agent_id'" #default="scope">
            {{ selectToLabel(indexStore.agentArray, scope.row.agent_id) }}
          </template>
          <template v-if="item.prop == 'game_name'" #default="scope">
            <GameHeaderInfo :class="data.gameType != 1 ? 'paddingLeft42' : ''" :game_id="scope.row.game_id" />
          </template>
          <template v-if="item.prop == 'game_type'" #default="scope">
            <el-tag>{{ selectToLabel(GAMETYPE, scope.row.game_type) }}</el-tag>
          </template>
          <template v-if="item.prop == 'trial_path'" #default="scope">
            <el-button type="success" size="small" v-loading="indexStore.moduleLoading"
              :disabled="selectToLabel(data.gamePathList, scope.row.game_id, 'id', 'id') ? false : true"
              @click="trialPathGame(scope.row)">试玩游戏</el-button>
          </template>
          <template v-if="item.prop == 'a_slots_backend_echo'" #default="scope">
            {{ BigHundred(scope.row.pg_game.a_slots_backend_echo) }}%
          </template>
          <template v-if="item.prop == 'a_slots_rtptype'" #default="scope">
            <el-tag>{{ scope.row.pg_game.a_slots_rtptype ? selectToLabel(RtpType, scope.row.pg_game.a_slots_rtptype) :
              '-' }}</el-tag>
          </template>
          <template v-if="item.prop == 'a_slots_auto'" #default="scope">
            <span v-if="scope.row.pg_game.a_slots_auto == -1 ? true : false">-</span>
            <el-tag v-else :type="scope.row.pg_game.a_slots_auto ? 'danger' : 'success'">{{
              scope.row.pg_game.a_slots_auto ? '关闭' : '开启' }}</el-tag>
          </template>
          <template v-if="item.prop == 'a_slots_maxwin'" #default="scope">
            {{ scope.row.pg_game.a_slots_maxwin }}
          </template>
          <template v-if="item.prop == 'a_slots_amount'" #default="scope">
            <span v-for="(second, two) in scope.row.amount" :key="two">{{ second }}
              <span v-if="two != scope.row.amount.length - 1">,</span>
            </span>
          </template>
          <template v-if="item.prop == 'show'" #default="scope">
            <el-tag :type="scope.row.show ? 'success' : 'danger'">{{ selectToLabel(DEMOPLAY, scope.row.show)
              }}</el-tag>
          </template>
          <template v-if="item.prop == 'status'" #default="scope">
            <el-tag :type="scope.row.status ? 'primary' : 'danger'">
              {{ selectToLabel(GameStatus, scope.row.status) }}
            </el-tag>
          </template>
        </el-table-column>
      </template>
      <el-table-column label="维护游戏" fixed="right" width="115" align="center">
        <template #header>
          <el-tooltip effect="dark" content="维护游戏/开启游戏：控制游戏维护开启的按钮" placement="top">
            <el-icon class="ques-tips">
              <QuestionFilled />
            </el-icon>
          </el-tooltip>
          维护游戏
        </template>
        <template #default="scope">
          <el-button :type="scope.row.status ? 'danger' : 'success'" v-permiss="'/system/changeManager'" size="small"
            @click="handleChange(scope.row)">
            {{ scope.row.status ? '维护游戏' : '开启游戏' }}
          </el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作" fixed="right" :width="data.gameType == 2 ? 300 : 140" align="center">
        <template #header>
          <el-tooltip effect="dark" placement="top">
            <template #content> 群控设置：设置luck win的调控配置控制输赢 <br />编辑：重新编辑此游戏的信息 </template>
            <el-icon class="ques-tips">
              <QuestionFilled />
            </el-icon>
          </el-tooltip>
          详情
        </template>
        <template #default="scope">
          <div class="flex">
            <el-button type="danger" v-if="data.gameType == 2 && scope.row.game_id == 100003 || scope.row.game_id == 100002 ? true : false"
              v-permiss="'/system/destroyManager'" size="small" @click="checkDetails(scope.row, 'control')">
              群控设置
            </el-button>
            <div style="width: 72px;height: 36px;margin-left: 12px;" v-if="data.gameType == 2 && scope.row.game_id != 100003 && scope.row.game_id != 100002 ? true : false" />
            <el-button type="success" v-permiss="'/system/destroyManager'" size="small" @click="checkDetails(scope.row, 'check')">
              查 看
            </el-button>
            <el-tooltip effect="dark" placement="top" content="维护游戏后再修改配置">
              <el-button :disabled="(scope.row.game_source && scope.row.status)?true:false" type="warning" v-permiss="'/system/destroyManager'" size="small"
                @click="checkDetails(scope.row, 'edit')">
                编 辑
              </el-button>
            </el-tooltip>
          </div>
        </template>
      </el-table-column>
    </template>
  </SearchTable>

  <!-- 变更表头弹框 -->
  <tableHeader :dialogVisible="data.dialogVisible" :list="data.fields" @cancel="data.dialogVisible = false"
    @resetData="resetData"></tableHeader>

  <!-- 游戏配置 -->
  <Config :show="data.isShowDetails" :isDisableUser="data.isDisableUser" :checkedItem="data.checkedItem"
    @onHideDetails="onHideDetails" />

  <!-- 群控配置 -->
  <ControlLuckWin :show="data.isShowControlLuckWin" :checkedItem="data.checkedItem" @onHideDetails="onHideDetails" />
  <ControlBattleRoyale :show="data.isShowControlBattleRoyale" :checkedItem="data.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 批量维护游戏 -->
  <el-dialog v-model="data.isShowMaintain" title="游戏RTP设置+维护游戏" :destroy-on-close="true"
    :close-on-click-modal="false" :close-on-press-escape="false" top="25vh" @close="onHideDetails(false)">
    <template #header>
      <p class="box-title">{{ data.queryDetails.isRtpShow ? '游戏RTP设置' : `维护${selectToLabel(GAMETYPE,data.gameType)}游戏` }}</p>
    </template>
    <BatchControl ref="BatchControlRef" :gameType='data.gameType'>
      <template #header>
        <form-item title="游戏状态" value="status" v-show="!data.queryDetails.isRtpShow">
          <el-radio-group v-model="data.queryDetails.status" size="large">
            <el-radio-button label="关闭游戏" :value="0" />
            <el-radio-button label="开启游戏" :value="1" />
          </el-radio-group>
        </form-item>
        <form-item title="游戏类型" value="platform" v-show="!data.queryDetails.isRtpShow">
          <el-select v-model="data.gameType" placeholder="请选择" filterable :disabled="true">
            <el-option class="marginB5 marginT5" v-for="item in GAMETYPE" :key="item.value" :label="item.label" :value="item.value"/>
          </el-select>
        </form-item>
      </template>
      <template #footer>
        <form-item title="RTP设定" :pass="true" value="a_slots_backend_echo" v-show="data.queryDetails.isRtpShow">
          <el-select v-model="data.queryDetails.a_slots_backend_echo" placeholder="请选择RTP" filterable>
            <el-option v-show="item && item == 200 ? operatorTypeShow : true" v-for="item in data.rtpShowList"
              :label="item + '%'" :value="item" />
          </el-select>
        </form-item>
        <form-item title="RTP类型" value="a_slots_rtptype" v-show="data.queryDetails.isRtpShow">
          <el-select v-model="data.queryDetails.a_slots_rtptype" placeholder="请选择RTP类型" filterable>
            <el-option v-show="item.value < 4 ? true : false" v-for="item in RtpType" :label="item.label"
              :value="item.value" />
          </el-select>
        </form-item>
      </template>
    </BatchControl>
    <template #footer>
      <div class="flexWrapDetween">
        <div v-show="!data.queryDetails.isRtpShow" class="flex">
          <el-button :type="data.queryDetails.status?'success':'danger'" @click="maintainAllGame">{{ data.queryDetails.status?'开启':'维护' }}所有游戏</el-button>
          <span class="tipsTextRed">({{ data.queryDetails.status?'开启':'维护' }}选择商户的当前品类及其他品类所有游戏)</span>
        </div>
        <div v-show="data.queryDetails.isRtpShow"></div>
        <div class="flex">
          <el-button type="info" @click="onHideDetails(false)">取 消</el-button>
          <el-button :type="data.queryDetails.status?'success':'danger'" size="small" @click="maintainGame">{{data.queryDetails.isRtpShow?'保存设置': (data.queryDetails.status?'开启':'维护') + selectToLabel(GAMETYPE,data.gameType)+'的游戏' }}</el-button>
        </div>
      </div>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { ref, reactive, onMounted } from 'vue'
import axios from 'axios'
import { ElMessage, ElMessageBox } from 'element-plus'
import Operator, { type QueryType } from '@/components/FormItem/Operator.vue'
import GameItem, { type GameType } from '@/components/FormItem/GameItem.vue'
import GameHeaderInfo from '@/components/FormItem/GameHeaderInfo.vue'
import BatchControl from '@/components/FormItem/BatchControl.vue'
import tableHeader from '@/components/tableHeader/tableHeader.vue'
import SearchTable from '@/components/SearchTable/SearchTable.vue'
import Config from '@/views/configManage/components/config.vue'
import ControlLuckWin from '@/views/configManage/components/ControlLuckWin.vue'
import ControlBattleRoyale from '@/views/configManage/components/ControlBattleRoyale.vue'
import { GAMETYPE, DEMOPLAY, GameStatus, RtpType } from '@/config/eunm'
import { throttle, selectToLabel, setSemicolonToArr, setCommaToArr } from '@/utils/index'
import { BigHundred, BigTimeHundred, BigWan } from '@/utils/math'
import { getAgentApiList } from '@/api/merchant'
import { getGame, editGame, editMaintainGame, editAgentMaintainGame, editRtpTypeGame } from '@/api/game'

import { useStore } from '@/stores/index'
const indexStore = useStore()

const data = reactive({
  query: {
    page: 1,
    size: 50,
    game_type: 1,
    agent_id: -1,
    operated_id: -1,
    game_id: -1,
    platform: -1,
  },
  list: [],
  total: 0,
  gameType: 1,
  queryDetails: {
    isRtpShow: false,
    operated_id: -1,
    status: 0,
    game_ids: [],
    agent_ids: [],
    is_all: 0,
    a_slots_backend_echo: 70,
    a_slots_rtptype: 1
  },
  commercialArray: [] as any[],
  fields: [
    { label: '商户昵称', prop: 'agent_id', width: '150', visible: true, tips: '商户的名称' },
    { label: '游戏名称', prop: 'game_name', width: '200', visible: true, tips: '游戏名称的描述说明' },
    { label: '英文名称', prop: 'game_name_en', width: '150', visible: true, tips: '游戏英文名称的描述说明' },
    { label: '游戏ID', prop: 'game_id', width: '100', visible: true, tips: '游戏的唯一标识' },
    { label: '游戏类型', prop: 'game_type', width: '120', visible: true, tips: '此游戏的类型，区分为百人、MiniGame 、老虎机' },
    { label: '试玩路径', prop: 'trial_path', width: '120', visible: true, tips: '游戏试玩的路径' },
    { label: 'RTP设定', prop: 'a_slots_backend_echo', width: '120', visible: true, tips: '游戏的回报率设定；值越高玩家盈利机会越高' },
    { label: 'RTP类型', prop: 'a_slots_rtptype', width: '120', visible: true, tips: '游戏的回报率类型' },
    { label: '止损止赢开关', prop: 'a_slots_auto', width: '150', visible: true, tips: 'slot的AUTO附加功能，开启后，玩家在游戏内自动旋转时，可以设定条件，达到输赢条件停止自动旋转' },
    { label: '倍数限制', prop: 'a_slots_maxwin', width: '120', visible: true, tips: '玩家在游戏内每局赢奖倍数限制,此倍数与总押注相乘为每局最高可赢取额度' },
    { label: '投注金额', prop: 'a_slots_amount', width: '120', visible: true, tips: '游戏的单押投注额度展示；游戏的总押注=单押额*押注等级（1~10）*游戏线数' },
    { label: '状态', prop: 'status', width: '100', visible: true, tips: '游戏维护和开启' },
  ],
  dialogVisible: false,
  isShowDetails: false,
  isDisableUser: false,
  isShowMaintain: false,
  isShowAgentMaintain: false,
  isShowUrl: false,
  isShowControlLuckWin: false,
  isShowControlBattleRoyale: false,
  checkedItem: {} as any,
  baseUrl: 'https://api.omgapi.cc',
  gamePathList: [],
  app_id: 0,
  token: '',
  rtpShowList: [] as any[],
})

const operatorTypeShow = (!indexStore.is_general_agent || indexStore.userInfo.operator_type) ? true : false

// 商户类别 + 商户
const queryItem = (item: QueryType) => {
  data.query.agent_id = item.agent_id
  data.query.operated_id = item.operated_id
}
// 游戏品牌 + 游戏
const queryGame = (item: GameType) => {
  data.query.platform = item.platform
  data.query.game_id = item.game_id
}

onMounted(async () => {
  getGameInfo()
  getSearchList()
  GameItemRef.value.getGameType(1)
})

// 选择游戏tab
const handleClick = async () => {
  data.query.game_type = data.gameType
  data.list = []
  data.total = 0
  data.fields = [
    { label: '商户昵称', prop: 'agent_id', width: '150', visible: true, tips: '商户的名称' },
    { label: '游戏名称', prop: 'game_name',width: data.gameType == 1 ? '200' : '', visible: true, tips: '游戏名称的描述说明' },
    { label: '英文名称', prop: 'game_name_en', width: '150', visible: true, tips: '游戏英文名称的描述说明' },
    { label: '游戏ID', prop: 'game_id', width: '100', visible: true, tips: '游戏的唯一标识' },
    { label: '游戏类型', prop: 'game_type', width: '120', visible: true, tips: '此游戏的类型，区分为百人、MiniGame 、老虎机' },
    { label: '试玩路径', prop: 'trial_path', width: '120', visible: true, tips: '游戏试玩的路径' },
    { label: 'RTP设定', prop: 'a_slots_backend_echo', width: '120', visible: data.gameType == 1 ? true : false, tips: '游戏的回报率设定；值越高玩家盈利机会越高' },
    { label: 'RTP类型', prop: 'a_slots_rtptype', width: '120', visible: data.gameType == 1 ? true : false, tips: '游戏的回报率类型' },
    { label: '止损止赢开关', prop: 'a_slots_auto', width: '150', visible: data.gameType == 1 ? true : false, tips: 'slot的AUTO附加功能，开启后，玩家在游戏内自动旋转时，可以设定条件，达到输赢条件停止自动旋转' },
    { label: '倍数限制', prop: 'a_slots_maxwin', width: '120', visible: data.gameType == 1 ? true : false, tips: '玩家在游戏内每局赢奖倍数限制,此倍数与总押注相乘为每局最高可赢取额度' },
    { label: '投注金额', prop: 'a_slots_amount', width: '100', visible: data.gameType == 1 ? true : false, tips: '游戏的单押投注额度展示；游戏的总押注=单押额*押注等级（1~10）*游戏线数' },
    { label: '状态', prop: 'status', width: '100', visible: true, tips: '游戏维护和开启' },
  ]
  resetDetails(false)
}
const getSearchList = async () => {
  indexStore.setPageLoading(true)
  let query = JSON.parse(JSON.stringify(data.query));
  if (query.platform == -1) {
    query.platform = ''
  }
  let res = await getGame(query)
  res.data?.list?.forEach((item: any, index: number) => {
    item.amount = setArrBetFace(item.pg_game.a_slots_amount)
    if (item.game_id == 100004) {
      res.data?.list.splice(index, 1,)
    }
  })
  data.list = res.data?.list
  data.total = res.data.total
  // 展示rtp
  data.rtpShowList = setStrRtpShow(res.data?.list[0]?.pg_game?.a_slots_rtpshow)
}

// 详情
const checkDetails = async (row: any, type: string) => {
  if (type == 'control') {
    if (row.game_id == 100002) {
      data.isShowControlBattleRoyale = true
    }
    if (row.game_id == 100003) {
      data.isShowControlLuckWin = true
    }
  } else {
    if (type == 'check') {
      data.isDisableUser = true
    }
    data.isShowDetails = true
  }
  Object.assign(data.checkedItem, row)
}

// 试玩路径
const getGameInfo = () => {
  axios({
    url: data.baseUrl + '/api/v1/pg/live-api/games',
    headers: {
      'content-type': 'application/json;charset=utf-8',
      'ngrok-skip-browser-warning': true
    },
    method: 'GET',
  }).then(res => {
    data.gamePathList = res.data.data.games
    data.app_id = res.data.data.app_id
    data.token = res.data.data.token
  })
}
const trialPathGame = throttle((row: any) => {
  indexStore.setModuleLoading(true)
  axios({
    url: data.baseUrl + '/api/usr/ingame',
    headers: {
      'content-type': 'application/json;charset=utf-8',
      'ngrok-skip-browser-warning': true
    },
    method: 'POST',
    data: JSON.stringify({
      gameid: JSON.stringify(row.game_id),
      lang: 'en',
      nick: JSON.stringify(row.game_id),
      appid: JSON.stringify(data.app_id),
      token: data.token,
    }),
  }).then(res => {
    indexStore.setModuleLoading(false)
    if (!res.data.code) {
      window.open(res.data.data.gameurl)
    } else {
      ElMessage.error('复制成功')
    }
  })
}, 5000)

// 开启-关闭游戏
const handleChange = (row: { test_account: string; status: number; game_id: number; agent_id: number }) => {
  let msg = row.status == 1 ? '确认是否关闭游戏？' : '确认是否开启游戏？', dataRow = JSON.parse(JSON.stringify(row));
  ElMessageBox.confirm(msg, '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消'
  }).then(async () => {
    dataRow.status = dataRow.status ? 0 : 1
    if(row.game_id>10000000){
      await editAgentMaintainGame({
        gamelist: [row.game_id],
        maintain: !dataRow.status?[row.agent_id]:[],
        running: dataRow.status?[row.agent_id]:[],
      })
    }else{
      await editGame(dataRow)
    }
    ElMessage.success('操作成功')
    getSearchList()
  }).catch(() => { })
}

// 选择总代-查询总代下所有商户
const getCommercialList = async (id: number) => {
  data.queryDetails.agent_ids = []
  data.queryDetails.game_ids = []
  let res = await getAgentApiList({ operated_id: id })
  data.commercialArray = res.data as any
}

// 维护游戏
const maintainGame = throttle(async () => {
  let query = JSON.parse(JSON.stringify(data.queryDetails)),mineGameId=[] as any[],gameId=[] as any[];
  // MineGame的游戏ID--普通游戏ID
  Object.assign(query, BatchControlRef.value.SetBatchControl())
  if (!query.game_ids.length) {
    return false
  }
  if(!query.isRtpShow){
    query.game_ids.forEach((id:number)=> {
      if(id>10000000){
        mineGameId.push(id)
      }else{
        gameId.push(id)
      }
    })
    query.game_ids = gameId
  }
  query.isRtpShow ? await editRtpTypeGame({
    agent_ids: query.agent_ids,
    game_ids: query.game_ids,
    column_data: [
      { column: 'a_slots_backend_echo', column_value: JSON.stringify(BigTimeHundred(query.a_slots_backend_echo)) },
      { column: 'a_slots_rtptype', column_value: JSON.stringify(query.a_slots_rtptype) },
    ]
  }) : await editMaintainGame(query)
  // 维护的第三方商户游戏
  if(mineGameId.length && !query.isRtpShow){
    await editAgentMaintainGame({
      gamelist: mineGameId,
      maintain: !query.status?query.agent_ids:[],
      running: query.status?query.agent_ids:[],
    })
  }
  ElMessage.success('操作成功')
  onHideDetails(false)
  getSearchList()
}, 2000)
// 维护所有游戏
const maintainAllGame = throttle(async () => {
  let query = JSON.parse(JSON.stringify(data.queryDetails)),mineGameId=[] as any[],gameId=[] as any[];
  query.agent_ids = BatchControlRef.value.getAgentId()
  if (!query.agent_ids.length) {
    return ElMessage.error('请选择商户！')
  }else if(query.agent_ids.find((item: number) => item == -1)){
    query.agent_ids=[]
    indexStore.agentArray.forEach((item:any)=> {
      query.agent_ids.push(item.value)
    })
  }
  // MineGame的游戏ID--普通游戏ID
  ElMessageBox.confirm((query.status?'开启':'维护')+'所有游戏？', '提示',{
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(async () => {
    indexStore.gameArray.forEach((item:any)=> {
      if(item.value>10000000){
        mineGameId.push(item.value)
      }else{
        gameId.push(item.value)
      }
    })
    query.game_ids = gameId
    await editMaintainGame(query)
    // 维护的第三方商户游戏
    await editAgentMaintainGame({
      gamelist: mineGameId,
      maintain: !query.status?query.agent_ids:[],
      running: query.status?query.agent_ids:[],
    })
    ElMessage.success('操作成功')
    onHideDetails(false)
    getSearchList()
  }).catch(() => {})
}, 2000)

const setStrRtpShow = (str: any) => {
  let arr = [], newArr: any[] = [];
  arr = setCommaToArr(str)
  arr.forEach((item: any) => {
    newArr.push(BigHundred(item))
  })
  return newArr
}
const setArrBetFace = (str: string) => {
  let arr = [], newArr = [] as any[]
  arr = setSemicolonToArr(str)
  arr[0]?.forEach((item: any) => {
    newArr.push(BigWan(item))
  })
  return newArr
}

// 修改页数
const changeSize = (val: number) => {
  data.query.size = val
}
const changePage = (val: number) => {
  data.query.page = val
  getSearchList()
}
// 重置表头
const resetData = (val: any) => {
  data.fields = val
}

// 重置
const onHideDetails = (show: boolean) => {
  data.isShowDetails = false
  data.isDisableUser = false
  data.dialogVisible = false
  data.isShowControlLuckWin = false
  data.isShowControlBattleRoyale = false
  if (data.isShowMaintain) {
    BatchControlRef.value.onHideDetails()
  }
  data.isShowMaintain = false
  data.queryDetails = {
    isRtpShow: false,
    operated_id: -1,
    status: 0,
    game_ids: [],
    agent_ids: [],
    is_all: 0,
    a_slots_backend_echo: 70,
    a_slots_rtptype: 1
  }
  if (show) {
    data.query = {
      page: data.query.page,
      size: data.query.size,
      game_type: data.gameType,
      operated_id: data.query.operated_id,
      agent_id: data.query.agent_id,
      game_id: data.query.game_id,
      platform: data.query.platform,
    }
    getSearchList()
  }
}
const OperatorRef = ref<any>()
const GameItemRef = ref<any>()
const BatchControlRef = ref<any>()
const resetDetails = (show: boolean) => {
  data.query = {
    page: 1,
    size: 50,
    game_type: data.gameType,
    operated_id: show ? -1 : data.query.operated_id,
    agent_id: show ? -1 : data.query.agent_id,
    game_id: -1,
    platform: -1,
  }
  if (show) {
    OperatorRef.value.onHideDetails()
  }
  GameItemRef.value.onHideDetails(data.gameType)
  if (data.isShowMaintain) {
    BatchControlRef.value.onHideDetails()
  }
  getSearchList()
}
</script>

<style scoped lang="scss">
.paddingLeft42 {
  padding-left: 42%;
}
</style>
